package com.example.hospitalbakcends.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

/**
 * 药品
 * @TableName medicines
 */
public class Medicines implements Serializable {
    /**
     * medId
     */
    @TableId(type = IdType.AUTO)//在自增主键的变量加上即可
    private Long medid;

    /**
     * 药品名称
     */
    private String medname;

    /**
     * 药品单价
     */
    private Double medprice;

    /**
     * 药品编号
     */
    private String mednumber;

    /**
     * 药品供应商
     */
    private String medcompany;

    /**
     * 药品简介
     */
    private String medprofile;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 生产时间
     */
    private Date productiontime;

    /**
     * 有效时间
     */
    private Date effectivetime;

    /**
     * 更新时间
     */
    private Date updatetime;

    /**
     * 是否删除
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    /**
     * medId
     */
    public Long getMedid() {
        return medid;
    }

    /**
     * medId
     */
    public void setMedid(Long medid) {
        this.medid = medid;
    }

    /**
     * 药品名称
     */
    public String getMedname() {
        return medname;
    }

    /**
     * 药品名称
     */
    public void setMedname(String medname) {
        this.medname = medname;
    }

    /**
     * 药品单价
     */
    public Double getMedprice() {
        return medprice;
    }

    /**
     * 药品单价
     */
    public void setMedprice(Double medprice) {
        this.medprice = medprice;
    }

    /**
     * 药品编号
     */
    public String getMednumber() {
        return mednumber;
    }

    /**
     * 药品编号
     */
    public void setMednumber(String mednumber) {
        this.mednumber = mednumber;
    }

    /**
     * 药品供应商
     */
    public String getMedcompany() {
        return medcompany;
    }

    /**
     * 药品供应商
     */
    public void setMedcompany(String medcompany) {
        this.medcompany = medcompany;
    }

    /**
     * 药品简介
     */
    public String getMedprofile() {
        return medprofile;
    }

    /**
     * 药品简介
     */
    public void setMedprofile(String medprofile) {
        this.medprofile = medprofile;
    }

    /**
     * 创建时间
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 创建时间
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * 生产时间
     */
    public Date getProductiontime() {
        return productiontime;
    }

    /**
     * 生产时间
     */
    public void setProductiontime(Date productiontime) {
        this.productiontime = productiontime;
    }

    /**
     * 有效时间
     */
    public Date getEffectivetime() {
        return effectivetime;
    }

    /**
     * 有效时间
     */
    public void setEffectivetime(Date effectivetime) {
        this.effectivetime = effectivetime;
    }

    /**
     * 更新时间
     */
    public Date getUpdatetime() {
        return updatetime;
    }

    /**
     * 更新时间
     */
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    /**
     * 是否删除
     */
    public Integer getIsdelete() {
        return isdelete;
    }

    /**
     * 是否删除
     */
    public void setIsdelete(Integer isdelete) {
        this.isdelete = isdelete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Medicines other = (Medicines) that;
        return (this.getMedid() == null ? other.getMedid() == null : this.getMedid().equals(other.getMedid()))
            && (this.getMedname() == null ? other.getMedname() == null : this.getMedname().equals(other.getMedname()))
            && (this.getMedprice() == null ? other.getMedprice() == null : this.getMedprice().equals(other.getMedprice()))
            && (this.getMednumber() == null ? other.getMednumber() == null : this.getMednumber().equals(other.getMednumber()))
            && (this.getMedcompany() == null ? other.getMedcompany() == null : this.getMedcompany().equals(other.getMedcompany()))
            && (this.getMedprofile() == null ? other.getMedprofile() == null : this.getMedprofile().equals(other.getMedprofile()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getProductiontime() == null ? other.getProductiontime() == null : this.getProductiontime().equals(other.getProductiontime()))
            && (this.getEffectivetime() == null ? other.getEffectivetime() == null : this.getEffectivetime().equals(other.getEffectivetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMedid() == null) ? 0 : getMedid().hashCode());
        result = prime * result + ((getMedname() == null) ? 0 : getMedname().hashCode());
        result = prime * result + ((getMedprice() == null) ? 0 : getMedprice().hashCode());
        result = prime * result + ((getMednumber() == null) ? 0 : getMednumber().hashCode());
        result = prime * result + ((getMedcompany() == null) ? 0 : getMedcompany().hashCode());
        result = prime * result + ((getMedprofile() == null) ? 0 : getMedprofile().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getProductiontime() == null) ? 0 : getProductiontime().hashCode());
        result = prime * result + ((getEffectivetime() == null) ? 0 : getEffectivetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", medid=").append(medid);
        sb.append(", medname=").append(medname);
        sb.append(", medprice=").append(medprice);
        sb.append(", mednumber=").append(mednumber);
        sb.append(", medcompany=").append(medcompany);
        sb.append(", medprofile=").append(medprofile);
        sb.append(", createtime=").append(createtime);
        sb.append(", productiontime=").append(productiontime);
        sb.append(", effectivetime=").append(effectivetime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}